package com.example.petcare.mapper;

import com.example.petcare.pojo.OrderPhoto;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface OrderPhotoMapper {

    // 添加订单照片
    @Insert("INSERT INTO order_photo (host_id, photo_type, photo_url, remarks, record_date, upload_time) " +
            "VALUES (#{hostId}, #{photoType}, #{photoUrl}, #{remarks}, #{recordDate}, #{uploadTime})")
    void add(OrderPhoto orderPhoto);

    // 查看指定日期的记录
    List<OrderPhoto> getPhotosByDate(Integer hostId, LocalDate localDate);



}
